package com.peanut.service.Impl;

import com.peanut.dao.CommonDao;
import com.peanut.dao.NavDao;
import com.peanut.dao.NewsDao;
import com.peanut.model.NavModel;
import com.peanut.service.NewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class NewsServiceImpl implements NewsService {
    @Autowired
    private NewsDao newsDao;
    @Autowired
    private CommonDao commonDao;
    @Autowired
    private NavDao navDao;

    @Override
    public Map<String, Object> getNewsList() {
        Map<String,Object> map =new HashMap<>();
        map.put("common",commonDao.getCommonDate());
        map.put("nav",navDao.getNavList());
        map.put("newsList",newsDao.getNewsList());
        return map;
    }


}
